home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / var / lib / dpkg / info / util-linux.postinst < prev    next >
Encoding:
Text File  |  2011-01-25  |  1.7 KB  |  55 lines

  1. #! /bin/sh
  2.  
  3. umask 022
  4. set -e
  5.  
  6. update-alternatives --install /usr/bin/pager pager /bin/more 50 \
  7.   --slave /usr/share/man/man1/pager.1.gz pager.1.gz /usr/share/man/man1/more.1.gz
  8. update-alternatives --install /usr/bin/pager pager /usr/bin/pg 10 \
  9.   --slave /usr/share/man/man1/pager.1.gz pager.1.gz /usr/share/man/man1/pg.1.gz
  10.  
  11. #
  12. #    Check if links to hwclock.sh are present in runlevel "6".
  13. #    If not, remove the ones from runlevel "S" so that
  14. #    update-rc.d will do it's job.
  15. #
  16. if [ ! -f /etc/rc6.d/???hwclock.sh ] && [ ! -f /etc/rc0.d/???hwclock.sh ]
  17. then
  18.     rm -f /etc/rcS.d/???hwclock.sh
  19. fi
  20.  
  21. # hwclock works on all Linux architectures, except s390 (and s390x, of course).
  22. if [ "$(uname -s)" = "Linux" ]; then
  23.     model=$(uname -m)
  24.     if [ ${model%x} != "s390" ]; then
  25.         update-rc.d -f hwclock.sh remove 2>/dev/null > /dev/null
  26.         update-rc.d hwclock.sh start 11 S . stop 25 0 6 . > /dev/null
  27.         update-rc.d -f hwclockfirst.sh remove 2>/dev/null > /dev/null
  28.     if [ -f /etc/init.d/hwclockfirst.sh ]; then
  29.       update-rc.d hwclockfirst.sh start 8 S . > /dev/null
  30.     fi
  31.     fi
  32. fi
  33.  
  34. if [ -x /usr/sbin/update-mime ]; then
  35.     update-mime
  36. fi
  37.  
  38. if [ -L /usr/doc/util-linux ] ; then
  39.     rm -f /usr/doc/util-linux
  40. fi
  41.  
  42. # warn about #566072, if applicable (when upgrading from versions prior to
  43. # 2.17, and there are fstab entries with noauto in the 4th column, and
  44. # non-zero in the 6th column (cases where the 6th column is ommited are OK)
  45. if test "x$2" != "x" && dpkg --compare-versions "$2" lt 2.17 && \
  46.    test -f /usr/share/debconf/confmodule && \
  47.    sed 's/\s\s*/ /g' /etc/fstab | cut -d' ' -f 1,4,6 | \
  48.        egrep -q '^[^#]\S+ \S*noauto\S* [^0]'; then
  49.     . /usr/share/debconf/confmodule
  50.     db_input critical util-linux/noauto-with-nonzero-passnum
  51.     db_go
  52. fi
  53.  
  54.  
  55.